<?php

namespace App\Models;

use Spatie\Permission\Models\Role;
class SystemUserRole extends Role
{
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y/m/d H:i:s');
    }
    public function department(){
        return $this->hasOne(Department::class,'id','department_id');
    }
    public function first(){
        return $this->hasOne(Department::class,'id','department_one_id');
    }
    public function two(){
        return $this->hasOne(Department::class,'id','department_two_id');
    }
    public function three(){
        return $this->hasOne(Department::class,'id','department_three_id');
    }
}
